﻿using System;
using Crowler.Model.CoreComponents;
using Crowler.Model.CoreComponents.DataAccess;
using NHibernate;

namespace CoreComponents.DataAccess
{
    public class GenericTransaction: IGenericTransaction
    {
        private readonly ITransaction _transaction;

        public GenericTransaction(ITransaction transaction)
        {
            _transaction = transaction;
        }

        public void Dispose()
        {
            _transaction.Dispose();
        }

        public void Commit()
        {
            _transaction.Commit();
        }

        public void Rollback()
        {
            _transaction.Rollback();
        }
    }
}
